package com.bwf.state;

/**
 * @Version v1.0
 * @Description: TODO
 * @Author ZHANZHONGXIN
 * @Date 2022/5/19 14:45
 * @Copyright 博为峰
 */
public class JoinTest {
    public static void main(String[] args) throws InterruptedException {
        final JoinDemo joinDemo = new JoinDemo();

        final Thread t0 = new Thread(joinDemo);
        t0.start();
//        t0.join();//等待t0线程结束，main处于阻塞状态

        final Thread t1 = new Thread(joinDemo);
        t1.start();

        /*for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName() + ":i=" + i);
        }*/

    }
}
